<%=
  tsa_addrs = nil
  tsa_port = nil
  tsa_host_public_key = nil

  if_p("tsa.host", "tsa.port", "tsa.host_public_key") do |host, port, public_key|
    tsa_addrs = [host]
    tsa_port = port
    tsa_host_public_key = public_key
  end

  if tsa_addrs.nil? && tsa_port.nil?
    tsa = link("tsa")
    tsa_addrs = tsa.instances.map(&:address)
    tsa_port = tsa.p("bind_port")
    tsa_host_public_key = tsa.p("host_public_key")
  end

  if tsa_host_public_key && !tsa_host_public_key.empty?
    tsa_addrs.collect { |addr|
      "[#{addr}]:#{tsa_port} #{tsa_host_public_key}"
    }.join("\n")
  else
    # no statically provided public keys; rely on generated
    # keys at runtime
    ""
  end
%>
